package com.gitee.dupe.dict.dto;

import com.gitee.dolt.core.base.entity.SuperEntity;
import com.gitee.dolt.core.validator.SimpleCharacter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @author LYH
 */
@Data
@Accessors(chain = true)
public class DictionaryTypeSaveDTO {

    @NotNull(groups = SuperEntity.Update.class)
    @Null(groups = SuperEntity.Save.class)
    private Long id;

    /**
     * 类型
     */
    @ApiModelProperty(value = "类型", required = true)
    @NotBlank
    @SimpleCharacter
    private String type;

    /**
     * 类型标签
     */
    @ApiModelProperty(value = "类型标签", required = true)
    @NotBlank
    @Length(max = 255)
    private String label;

    /**
     * 是否可用
     */
    @ApiModelProperty(value = "是否启用")
    private Boolean enabled;
}
